package io.github.tangwan.jdk8.thread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author tangwan
 * @version V1.0
 * created on 2021/7/27 11:25
 * @since JDK 1.8
 */
public class MyThread4 implements Runnable {

    @Override
    public void run() {
        System.out.println(Thread.currentThread().getName());
    }

    public static void main(String[] args) {
        ExecutorService executorService = Executors.newFixedThreadPool(10);
        for (int i = 0;i < 10;i++){
            executorService.execute(new MyThread4());
        }
        executorService.shutdown();
    }

}
